<template>
	<!-- 业绩通用组件 每个盒子带有一个弹出层 点击即可查看详情 -->
	<view class="setPadding ">
		<u-popup :show="popupFlag" @close="popupFlag=false" mode="left" >
			<scrollslot :heightSure="'height: 100vh;'" :colorSure="'color: #19be6b;'">
				<view :slot="'t1'">
				</view>
				<view :slot="'t2'">
					<view class="setPadding " style="margin-top: 50rpx;">
						<view class="" @click="popupFlag=false">
							<text class="iconfont iconarrow-left-bold" style="font-size: 60rpx;position: fixed;bottom: 50%;right: 3%;transform: translate(0,50%);"></text>
		
						</view>
						<companyAchievement v-if="currentData" :dataList="currentData"></companyAchievement>
					</view>
				</view>
			</scrollslot>
		
		</u-popup>
		
		<view class="setBgfff setBasestyle setPadding resultBox" v-for="(item1,index1) in allData" :key="index1">
			
			<view v-if="index2==0" v-for="(item2,index2) in item1.companyBidding" :key="index2">
				<view class="" @click="popupShow(item1)">
					<view class="setVertical">
						<!-- <text>2022年9月中标</text> -->
						<!-- <text >{{item2.companyWinningDate}}</text> -->
						<!-- <text class="setFont">{{item1.companyBaseInfo.companyProName}}</text> -->
						 <view class="setFont" v-html="item1.companyBaseInfo.companyProName"></view>
					</view>
					<view class="sethorizontalbetween setwarp">
						<view class="setVerticalCenter">
							<view class=" sethorizontalaround  ">
								<view v-if="item1.companyBaseInfo.companyBase" class="setMarginHorizontal">
									<u-tag :text="item1.companyBaseInfo.companyBase" size='mini'
										type="success" shape="circleLeft" />
								</view>
								<view v-if="item2.companyTenderMethod&&item2.companyTenderMethod!='-'" class="setMarginHorizontal">
									<u-tag :text="item2.companyTenderMethod" size='mini' type="success"
										shape="circleLeft" />
								</view>
								<view v-if="item2.companyTenderType" class="setMarginHorizontal">
									<u-tag :text="item2.companyTenderType" size='mini' type="success"
										shape="circleLeft" />
								</view>
							</view>
						</view>
						<view class="sethorizontalbetween">
							<u-icon name="clock"></u-icon>
							<text>{{item2.companyWinningDate}}</text>
						</view>
					</view>
					<view class="setVerticalCenter setMarginVertical setcolor">
						<view class="setVerticalCenter" @click.stop="toCompany(item1.companyCid)">
							<text v-if="item1.companyBidding.length==1" class="setNowrap1">中标单位：</text>
							<text  v-else class="setNowrap1">中标单位(不唯一)：</text>
							<!-- <text class="setNowrap2">{{item2.companyWinningUnitName}}</text> -->
							<view  class="setNowrap2" v-html="item2.companyWinningUnitName"></view>
						</view>
					</view>
					<view class="setVerticalCenter setMarginVertical">
						<text class="setNowrap1">中标通知书编号：</text>
						<text class="setNowrap2">{{item2.companyWinningNoticeNumber}}</text>
					</view>
				</view>
			</view>
			<view v-if="!item1.companyBidding.length"  @click="popupShow(item1)" class=" setwarp" >
				<!-- <text>2022年9月中标</text> -->
				<!-- <text >{{item2.companyWinningDate}}</text> -->
				<!-- <text class="setFont">{{item1.companyBaseInfo.companyProName}}</text> -->
				 <view class="setFont" v-html="item1.companyBaseInfo.companyProName"></view>
				<view class="setMarginHorizontal" style="">
					<u-tag :text="item1.companyBaseInfo.companyBase" size='mini'
						type="success" shape="circleLeft" />
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			allData: {
				type: Array,
				Array: []
			}
		},
		data() {
			return {
				
				currentData:null,
				popupFlag:false
			}
		},
		beforeMount() {
		
			
		},
		methods: {
			popupShow(item1){
			
				this.currentData=[]
				this.currentData.push(item1)
				this.popupFlag=true
			
			},
			toCompany(urls){
				uni.navigateTo({
					url: `/pagesFind/detailenterprise/detailenterprise?companyCid=${urls}`
				})
			}
		}
	
	}
</script>

<style>
</style>